using System;
using System.Collections.Generic;
using System.Text;
using Objects;
using DAL;

namespace BAL
{
    public class BALNguoiDung
    {

        BALNguoiDung _dal;
        public BALNguoiDung()
        {
            _dal = new BALNguoiDung();
        }

        public static NguoiDung GetById(int Id)
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.GeById(Id);
        }

        public static NguoiDung GetByUserPassword(string username, string password)
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.GetByUserPassword(username, password);
        }

        public static int Insert_NguoiDung(String TenNguoiDung, string username, String password, DateTime NgayTao, DateTime LanDangNhapCuoi, int Quyen, int SapXep)
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.Insert_NguoiDung(TenNguoiDung, username, password, NgayTao, LanDangNhapCuoi, Quyen, SapXep);
        }

        public static int Update_NguoiDung(int id, String TenNguoiDung, string username, String password, DateTime NgayTao, DateTime LanDangNhapCuoi, int Quyen, int SapXep)
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.Update_NguoiDung(id, TenNguoiDung, username, password, NgayTao, LanDangNhapCuoi, Quyen, SapXep);
        }

        public static int Delete_NguoiDung(int id)
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.Delete_NguoiDung(id);
        }


        public static List<NguoiDung> GetAllItem()
        {
            DALNguoiDung _dal = new DALNguoiDung();
            return _dal.GetAllItem();
        }


    }
}
